﻿using BaseData.Domain;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseData.Infrastructure
{
    public class DataDbContext : DbContext
    {
        public DataDbContext(DbContextOptions options) : base(options)
        {
        }
        /// <summary>
        /// 用户信息
        /// </summary>
        public DbSet<User> Users { get; set; }
        /// <summary>
        /// 角色信息
        /// </summary>
        public DbSet<Role> Roles { get; set; }
        /// <summary>
        /// 用户角色中间信息
        /// </summary>
        public DbSet<UserRoleRelation>  UserRoleRelations{ get; set; }
        /// <summary>
        /// 权限信息
        /// </summary>
        public DbSet<Permission> Permissions {  get; set; }
        /// <summary>
        /// 角色权限信息
        /// </summary>
        public DbSet<RolePermissionRelation>  RolePermissionRelations{ get; set; }
    }
}
